import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      meta: {
        hasTitle: false
      },
      component: () => import('../components/login') // 登录页面
    },
    // 我的
    {
      path: '/myIndex',
      name: 'my-index',
      meta: {
        hasTitle: false
      },
      component: () => import('../components/my')
    },
    {
      path: '/studentImpInfo',
      name: 'studentImpInfo',
      meta: {
        hasTitle: false
      },
      component: () => import('../components/my/studentImpInfo') // 个人信息完善
    },
    {
      path: '/myEditor',
      name: 'my-editor',
      meta: {
        hasTitle: true,
        title: '个人信息'
      },
      component: () => import('../components/my/myEditor') // 修改个人信息
    },
    {
      path: '/check',
      name: 'check',
      meta: {
        hasTitle: true,
        title: '签到打卡'
      },
      component: () => import('../components/my/check') // 签到
    },
    // 课程
    {
      path: '/index',
      name: 'index',
      meta: {
        hasTitle: true,
        title: '课程表'
      },
      component: () => import('../components/index/index2') // 学生首页课表
    },
    // {
    //   path: '/courseView',
    //   name: 'courseView',
    //   component: () => import('../components/index/courseView') // 课程查看
    // },
    {
      path: '/leave',
      name: 'leave',
      meta: {
        hasTitle: true,
        title: '请假'
      },
      component: () => import('../components/index/leave') // 请假
    },
    {
      path: '/assessView',
      name: 'assessView',
      meta: {
        hasTitle: true,
        title: '课程报告'
      },
      component: () => import('../components/index/assessView') // 分享评价
    },
    {
      path: '/poster',
      name: 'poster',
      meta: {
        hasTitle: true,
        title: '分享海报'
      },
      component: () => import('../components/index/poster') // 分享海报
    },
    // 消息
    {
      path: '/message',
      name: 'message',
      meta: {
        hasTitle: true,
        title: '消息管理'
      },
      component: () => import('../components/message') // 消息列表首页
    },
    {
      path: '/messageList/:type',
      name: 'messageList',
      meta: {
        hasTitle: true,
        title: '通知'
      },
      component: () => import('../components/message/message') // 消息列表
    }
  ]
})
